<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 
        计算阶乘 10！+9！+8!+7!+6!+5！+4！+3！+2！+1！
     -->
</head>

<body>

</body>

<script>
    let number = 0;
    let count = 10;
    for (let i = 1; i <= count; i++) {
        number += Factorial(i);
    }
    console.log(number);

    //数的阶乘
    function Factorial(n) {
        let result = 1;
        for (let i = 1; i <= n; i++) {
            result *= i;
        }
        return result;
    }
</script>

</html>